package D1;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-05-16
 * Time: 10:35
 */
public class Tools220054070111 {
    public String reverse(String str){
        StringBuffer s1 = new StringBuffer(str);
        s1.reverse();
        return s1.toString();
    }
    public  int[] mySort(int[] array){
        Arrays.sort(array);
        int[] array1 = new int[array.length];
        for (int i = 0; i <array.length; i++) {
            array1[i] = array[array.length - 1 - i];
        }
        return array1;
    }
    public int getDaysBetween(LocalDate date1 ,LocalDate date2 ){
        long day = date1.until(date2 , ChronoUnit.DAYS);
        int days = (int) day;
        return days ;
    }
}
